t = codesters.Teacher()
rand = t.get_parameters_for_function('randint')
try:
tval1 = t.find_function('randint')[0][1]
tval2 = int(rand[0][0])
tval3 = int(rand[0][1])
except:
tval1 = "DNE"
tval2 = "DNE"
tval3 = "DNE"
#print tval1
t1 = TestObjective()
t1.add_success('x' in tval1 and tval2 == -230 and tval3 == 230, "Great job!")
t1.add_failure(tval1 == "DNE", "Oops! Did you delete your Random Integer command?")
t1.add_failure('x' not in tval1, "Did you change the name of the random variable to x?")
t1.add_failure(tval2 == 1, "Did you change the first parameter in your Random Integer command?")
t1.add_failure(tval3 == 10, "Did you change the second parameter in your Random Integer command?")
t1.add_failure(tval2 != 1 and tval2 != -230 and tval2 != "DNE", "Make sure you change your first parameter to -230!")
t1.add_failure(tval3 != 10 and tval3 != 230 and tval3 != "DNE", "Make sure you change your second parameter to 230!")
tester = TestManager()
tester.add_test_list([t1])
tester.run_tests()
tester.display_first_feedback()
Are you already running a Codesters project in another tab or window?
Micro:bit can only connect to one web page at a time.
Try stopping other Codesters projects or closing
other tabs or windows that may be using your Micro:bit.
If that doesn't fix the problem try disconnecting your Micro:bit,
reloading this page, and reconnecting your Micro:bit.